#ifndef Aligner_Accuray_H_
#define Aligner_Accuray_H_

#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include "RefDB.h"
#include <math.h>
#include <map>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <stdlib.h>

using namespace std;

class AlignerAccuracy {

public:
	AlignerAccuracy();
	~AlignerAccuracy();

	void getMapping(string);
	int findAccuracy(string refFileName, string chromoSortedSamFileName, int editDist);
	void findCorrectness(string readSortedSamFileName, int errorThreshold);
	bool checkMapping(string realSequence, string mappedSequence, int editDistance);
	void buildChromoMap(string samFileName);
	bool checkMapping(struct readSequence mapped,
			struct readSequence real, int errorThreshold);
	unsigned int correctlyMapped, incorrectlyMapped, exactlyMapped,
			exactlyNotMapped, notMapped;
	map <string, unsigned int> chromoMap;
private:
	unsigned int calEditDistance(string realSeq, string mappedSeq);
	unsigned int convertChromo(string chromosome);
	string getComplementary(string mappedSeq);

	//data

};

struct readSequence {
	string chromosome;
	string location;

};

struct mapping{
	string chromosome;
	string location;
	string sequence;
};

struct trueRead {
	string chromo;

};
#endif
